package com.sydata.cdrdata.service;


import com.sydata.cdrdata.domain.AgentFlowRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 领科话单流量池结算
 *
 * @author haungzj
 * @date 2024-05-30
 */
public interface ILkCdrSettlementService {

    /**
     * 查询领科话单汇总数据 按m渠道、mcc和和日期分组先汇总
     * @return
     */
    public List<Map<String, Object>> getLkCdrRecordList();

    /**
     * 通过渠道、卡类型、mcc 去查找这个渠道下面国家的单价比例
     * @param channelId
     * @param simTypeId
     * @param mcc
     * @return
     */
    Map<String, Object> getRatioByMccAndChannel(@Param("channelId") String channelId, @Param("simTypeId") String simTypeId ,@Param("mcc") String mcc);

    /**
     * 更新渠道账户余额
     * @param supplierId
     * @param channelId
     * @param money
     * @return
     */
    public int updateChannelBalance(@Param("supplierId") String supplierId ,@Param("channelId") String channelId, @Param("money") double money);

    /**
     * 新增结算记录
     * @param agentFlowRecord
     * @return
     */
    public int insertAgentFlowRecord(AgentFlowRecord agentFlowRecord);
}
